CC = gcc
OBJS = main.o functions.o mtcore.o gui.o

mt: $(OBJS)
	$(CC) $^ -o $@

main.o: main.c
	$(CC) -c $^

functions.o: functions.c
	$(CC) -c $^

mtcore.o: mtcore.c
	$(CC) -c $^

gui.o: gui.c
	$(CC) -c $^

.PHONY: all run clean
	
clean:
	rm -f *.o *~

run:
	./mt -h

all:
	make clean && make run
